package com.tguigu.study.controller;

import cn.hutool.core.date.DateUtil;
import com.tguigu.study.service.FunctionAssistant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Marco
 * @Description
 * @date 2025/8/21 21:25
 * @email 3293336923@qq.com
 */
@Slf4j
@RestController
public class ChatFunctionCallingController {

    @Autowired
//    private FunctionAssistant  lowFunctionAssistant;
    private FunctionAssistant  highFunctionAssistant;

    @GetMapping("/chat/function/test01")
    public     String    test01(){
        String chat = highFunctionAssistant
                .chat("开张发票,公司：尚硅谷教育科技有限公司，税号：atguigu7312 ，金额:999.99");
        System.out.println("=====");
        log.info("chat:{}",chat);
        System.out.println("=====");
        return  "success: " + DateUtil.now() + "\t" + chat;
    }
}
